import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
	{ path: '/', redirect: '/login' },
	{
		path: '/login',
		name: 'login',
		// route level code-splitting
		// this generates a separate chunk (about.[hash].js) for this route
		// which is lazy-loaded when the route is visited.
		component: () => import(/* webpackChunkName: "login" */ '../views/login.vue')
	},
	{
		path: '/register',
		name: 'register',
		component: () => import(/* webpackChunkName: "register" */ '../views/register.vue')
	},
	{
		path: '/index',
		name: 'index',
		component: () => import(/*webpackChunkName:"index" */ '../views/index.vue')
	}
]

const router = new VueRouter({
	routes
})

export default router
